/*
 * @Description: 
 * @Version: 1.0
 * @Autor: gaoluo
 * @Date: 2021-09-16 16:41:40
 * @LastEditors: gaoluo
 * @LastEditTime: 2021-11-16 13:54:17
 * @FilePath: /nhw/src/api/work.js
 */
import request from './index'
// import axios from 'axios'

//安全培训列表
export function getTrainingList(params) {
    return request({
        method: 'get',
        url: '/eatm/eatmTrainNotesList.ajax',
        params
    })
}

//安全培训详情
export function getTrainingDetails(params) {
    return request({
        method: 'get',
        url: '/eatm/eatmTrainNotesDetails.ajax',
        params
    })
}

//安全会议列表
export function getMeetingList(params) {
    return request({
        method: 'get',
        url: '/safety/safetyMeetList.ajax',
        params
    })
}

//安全会议详情
export function getMeetingDetails(params) {
    return request({
        method: 'get',
        url: '/safety/safetyMeetDetails.ajax',
        params
    })
}

//随手拍提交
export async function problemClapSave(data = {}) {
    return await request.post('/rmpc/rskmgProblemClapSave.ajax', data)
}

//获取随手拍单据列表
export async function problemClapList(params = {}) {
    return await request.get('/rmpc/rskmgProblemClapList.ajax', {
        params
    })
}

//获取随手拍单据详情
export async function problemDetails(params = {}) {
    return await request.get('/rmpc/rskmgProblemDetails.ajax', {
        params
    })
}

//安全检查
export async function planRecordList(params = {}) {
    return await request.get('/rskmg/planRecordList.ajax', {
        params
    })
}

//提交安全新增
export async function goToCheckAdd(data) {
    return await request.post('/rskmg/gotoCheckAdd.ajax', data)
}

//待检查更新新增问题
export async function goToCheckUpdate(data) {
    return await request.post('/rskmg/gotoCheckUpdate.ajax', data)
}

//获取检查详情
export async function getCheckDetail(params = {}) {
    return await request.get("/rskmg/checkDetail.ajax", {
        params
    })
}

// 应急管理
export async function getDrillOtherList(params = {}) {
    return await request.get('/ememg/drillOtherList.ajax', {
        params
    })
}

//应急物资仓库存放列表
export async function getDrillOtherSubList(params = {}) {
    return await request.get("/ememg/drillOtherSubList.ajax", {
        params
    })
}
//应急预案方案
export async function getDrillYuAnDetail(params = {}) {
    return await request.get("/ememg/drillYuAnDetail.ajax", {
        params
    })
}

//应急预案处理 物资 联系
export async function getDrillOtherSubXXXList(params = {}) {
    return await request.get("/ememg/drillOtherSubXXXList.ajax", {
        params
    })
}

// 上传附加+图片
// export function uploadFile(data) {
//     return request.post('nhw/api/base/uploadAttachment.ajax', data, {
//         baseURL: '',
//         headers: { 'Content-Type': 'multipart/form-data' }
//     })
// }
export function uploadFile(data) {
    return request({
        method: 'post',
        url: '/base/uploadAttachment.ajax',
        data
    })
}

//作业管理 - 新增提交
export function JobSubmission(data) {
    return request({
        method: 'post',
        url: '/dgwk/dgwkWorkSave.ajax',
        data
    })
}
//作业管理 - 筛选菜单列表
export function WhenScreeningList(params) {
    return request({
        method: 'get',
        url: '/dgwk/dgwkWorkSelect.ajax',
        params
    })
}
//动作业历史记录列表
export function WhenHotList(params) {
    return request({
        method: 'get',
        url: '/dgwk/dgwkWorkList.ajax',
        params
    })
}
//动作业历史记录 - 发起流程
export function InitiateTheProcess(params) {
    return request({
        method: 'get',
        url: 'dgwk/dgwkWorkFlow.ajax',
        params
    })
}
//动作业历史记录详情
export function WhenHotDetails(params) {
    return request({
        method: 'get',
        url: '/dgwk/dgwkWorkDetails.ajax',
        params
    })
}

//设备报修 - 设备报修记录列表
export function EquipmentRepairServiceList(params) {
    return request({
        method: 'get',
        url: '/equip/equipRepairList.ajax',
        params
    })
}
//设备报修 - 设备报修记录详情
export function EquipmentRepairServiceDetails(params) {
    return request({
        method: 'get',
        url: '/equip/equipRepairDetail.ajax',
        params
    })
}
//设备报修 - 设备选择列表
export function EquipmentSelectionList(params) {
    return request({
        method: 'get',
        url: '/equip/equipSelector.ajax',
        params
    })
}

//设备报修 - 提交页面1 - 获取数据字典的接口
export function EquipmentRepairServicePost(params) {
    return request({
        method: 'get',
        url: '/base/getDictionary.ajax',
        params
    })
}
//设备报修 - 提交页面1 - 获取作业级别的接口
export function JobLevelList(params) {
    return request({
        method: 'get',
        url: '/dgwk/dgwkWorkTime.ajax',
        params
    })
}
//设备报修 - 提交页面1 - 获取施工单位的接口
export function ConstructionUnitList(params) {
    return request({
        method: 'get',
        url: '/dgwk/dgwkConsUnitSelector.ajax',
        params
    })
}
//设备报修 - 提交页面1 - 提交接口
export function EquipmentRepairServiceSearch(data) {
    return request({
        method: 'post',
        url: '/equip/equipRepairSave.ajax',
        data
    })
}


//获取菜单
export async function getMenuList() {
    return await request.get('/mine/getMenuList.ajax', {
    })
}

//获取字典
export async function getDictionary(code) {
    return await request.get("/base/getDictionary.ajax", {
        params: {
            code
        }
    })
}

//获取部门
export async function getDepart(params) {
    return await request.get("/base/getDepart.ajax", {
        params
    })
}
//获取组长
export async function getUserList(params) {
    return await request.get("/base/getUserList.ajax", {
        params
    })
}

//获取隐患基础库数据
export async function getYinHanList(params) {
    return await request.get("/rskmg/getYinHanList.ajax", {
        params
    })
}

//上传图片
export function uploadImage(data) {
    return request.post('/base/uploadImageOrVideo.ajax', data, {
        headers: { 'Content-Type': 'multipart/form-data' }
    })
}
//事故上报 - 数据字典
export function accidentTypes(params) {
    return request({
        method: 'get',
        url: '/adtmg/typeCheck.ajax',
        params
    })
}
//事故上报 - 新增提交
export function SubmitTheAccident(data) {
    return request({
        method: 'post',
        url: '/adtmg/add.ajax',
        data
    })
}
//事故上报 - 新增提交
export function getAccidentList(params) {
    return request({
        method: 'get',
        url: '/adtmg/infoList.ajax',
        params
    })
}
//事故上报 - 详情
export function DetailsOfTheAccident(params) {
    return request({
        method: 'get',
        url: '/adtmg/infoDetail.ajax',
        params
    })
}
//隐患整改 - 列表
export function HiddenDangersRectificationList(params) {
    return request({
        method: 'get',
        url: 'rskmg/infoList.ajax',
        params
    })
}
//隐患整改 - 详情
export function rectificationDetails(params) {
    return request({
        method: 'get',
        url: 'rskmg/infoDetail.ajax',
        params
    })
}
//隐患整改 - 详情 - 按钮列表
export function rectificationDetailsBtn(params) {
    return request({
        method: 'get',
        url: 'rskmg/getCheckOperationList.ajax',
        params
    })
}
//隐患整改 - 详情 - 按钮点击
export function rectificationDetailsBtnPost(params) {
    return request({
        method: 'get',
        url: 'rskmg/rrrCheckWorkFlow.ajax',
        params
    })
}
//应急演练 - 列表
export function EmergencyDrillList(params) {
    return request({
        method: 'get',
        url: 'ememg/drillRecordList.ajax',
        params
    })
}
//应急演练 - 详情
export function EmergencyDrillDetails(params) {
    return request({
        method: 'get',
        url: 'ememg/drillRecordDetail.ajax',
        params
    })
}
//设备巡检 - 列表
export function EquipmentInspectionList(params) {
    return request({
        method: 'get',
        url: 'equip/xjTaskCheckList.ajax',
        params
    })
}
//设备巡检 - 列表 - 待认领 - 认领按钮
export function SubmitTheClaim(params) {
    return request({
        method: 'get',
        url: 'equip/checkInfoClaim.ajax',
        params
    })
}
//设备巡检 - 已认领 - 详情
export function DeviceInspectionDetails(params) {
    return request({
        method: 'get',
        url: 'equip/areaList.ajax',
        params
    })
}
//设备巡检 - 已认领 - 详情 - 任务分配
export function DeviceTaskAssignment(params) {
    return request({
        method: 'get',
        url: 'equip/checkInfoAssignOrSubmit.ajax',
        params
    })
}
//设备巡检 - 已认领 - 详情 - 点检项
export function EquipmentPointCheckItems(params) {
    return request({
        method: 'get',
        url: 'equip/checkInfoBeforeSave.ajax',
        params
    })
}
//设备巡检 - 已认领 - 详情 - 点检项 - 提交
export function EquipmentPointCheckItemsSubmit(data) {
    return request({
        method: 'post',
        url: 'equip/checkInfoSave.ajax',
        data
    })
}
//设备巡检 - 已巡检 - 详情 
export function InspectionDetails(params) {
    return request({
        method: 'get',
        url: 'equip/checkInfoList.ajax',
        params
    })
}
//三关一闭 - 当天列表
export function todayCloseShopList(params) {
    return request({
        method: 'get',
        url: 'opmg/opmgBusinessList.ajax',
        params
    })
}
//三关一闭 - 闭店提交 - 风险等级列表
export function todayCloseShopInfo1(params) {
    return request({
        method: 'get',
        url: 'opmg/opmgBusinessDetails.ajax',
        params
    })
}
//三关一闭 - 闭店提交 
export function todayCloseShopSubmit(data) {
    return request({
        method: 'post',
        url: '/opmg/opmgBusinessSave.ajax',
        data
    })
}
//三关一闭 - 闭店历史记录
export function todayCloseShopHistoryList(params) {
    return request({
        method: 'get',
        url: 'opmg/opmgBusinessRecordList.ajax',
        params
    })
}
//三关一闭 - 闭店历史记录
export function todayCloseShopHistoryInfo(params) {
    return request({
        method: 'get',
        url: '/opmg/opmgBusinessDetails.ajax',
        params
    })
}
//三关一闭 - 我的店铺 - 提交 - 获取
export function todayMyShopHistoryInfo(params) {
    return request({
        method: 'get',
        url: 'opmg/opmgStoreDetails.ajax',
        params
    })
}
//三关一闭 - 我的店铺 - 月份列表
export function todayMyShopMonthList(params) {
    return request({
        method: 'get',
        url: 'opmg/opmgStoreRecordList.ajax',
        params
    })
}
//三关一闭 - 我的店铺 - 月份 - 具体数据列表
export function todayMyShopMonthInfoList(params) {
    return request({
        method: 'get',
        url: 'opmg/opmgStoreRecordDetailList.ajax',
        params
    })
}
//专项督办列表
export function overseeList(params) {
    return request({
        method: 'get',
        url: 'rskmg/SpecialSupervisonList.ajax',
        params
    })
}
//专项督办详情
export function OverseeTheDetails(params) {
    return request({
        method: 'get',
        url: 'rskmg/rskmgSpecialSupervisionDetail.ajax',
        params
    })
}
//专项督办 - 提交 - 责任人公司
export function ResponsibleCompanyList(params) {
    return request({
        method: 'get',
        url: 'rskmg/rskmgUserSelect.ajax',
        params
    })
}
//专项督办 - 提交
export function SupervisedAndSubmit(data) {
    return request({
        method: 'post',
        url: 'rskmg/SpecialSupervisonSave.ajax',
        data
    })
}
//设备扫码接口
export function scanTheCode(params) {
    return request({
        method: 'get',
        url: 'equip/equipQRCode.ajax',
        params
    })
}



